Dim vDice3 As Integer
Dim hDice3 As Integer
Dim vDice4 As Integer
Dim hDice4 As Integer
Dim vAlldice1
Dim hAlldice1
Dim hshot As Integer
Dim vdefend As Integer
Dim homeshot As Integer

Randomize
Dicec = (Int(Rnd * 6) + 1)
Diced = (Int(Rnd * 6) + 1)
Dicee = (Int(Rnd * 6) + 1)
Alldice4 = Dicec + Diced + Dicee
Select Case Alldice4
Case Is = 3
gamechartresult = 3
Case Is = 4
gamechartresult = 3
Case Is = 5
gamechartresult = 3
Case Is = 6
gamechartresult = 3
Case Is = 7
gamechartresult = 2
Case Is = 8
gamechartresult = 2
Case Is = 9
gamechartresult = 2
Case Is = 10
gamechartresult = 2
Case Is = 11
gamechartresult = 2
Case Is = 12
gamechartresult = 2
Case Is = 13
gamechartresult = 2
Case Is = 14
gamechartresult = 3
Case Is = 15
gamechartresult = 3
Case Is = 16
gamechartresult = 3
Case Is = 17
gamechartresult = 3
Case Is = 18
gamechartresult = 3
End Select



If gamechartresult = 2 Then

'2 POINT'
Randomize
hDice3 = (Int(Rnd * 6) + 1)
hAlldice = hDice3
Select Case hAlldice
Case Is = 1
hgamechartresult = 1
Case Is = 2
hgamechartresult = 2
Case Is = 3
hgamechartresult = 3
Case Is = 4
hgamechartresult = 4
Case Is = 5
hgamechartresult = 5
Case Is = 6
hgamechartresult = 50
End Select
hshot = hgamechartresult + hinside
hdie.Caption = hshot

Randomize
vDice3 = (Int(Rnd * 6) + 1)
vAlldice = vDice3
Select Case vAlldice
Case Is = 1
vgamechartresult = 1
Case Is = 2
vgamechartresult = 2
Case Is = 3
vgamechartresult = 3
Case Is = 4
vgamechartresult = 20
Case Is = 5
vgamechartresult = 100
Case Is = 6
vgamechartresult = 100
End Select
vdefend = vgamechartresult + vdefense

homeshot = hshot - vdefend
hdie.Caption = hshot
adie.Caption = vdefend
'Made Shot'
If homeshot >= -2 Then hTotal.Caption = hTotal + 2
If homeshot >= -2 Then hmade2.Caption = hmade2 + 1
If homeshot >= -2 Then hmade.Caption = hmade + 1
If homeshot >= -2 Then hattempt.Caption = hattempt + 1
If homeshot >= -2 Then hattempted2.Caption = hattempted2 + 1
If homeshot >= -2 Then Command5.Enabled = True
If homeshot >= -2 Then Command6.Enabled = False
If homeshot >= -2 Then Command10.Enabled = False
If homeshot >= -2 Then Command11.Enabled = False
If homeshot >= -2 Then Command12.Enabled = False
If homeshot >= -2 Then Command16.Enabled = False
If homeshot >= -2 Then Command17.Enabled = False
'Miss Shot'
If homeshot < -2 Then hattempted2.Caption = hattempted2 + 1
If homeshot < -2 Then hattempt.Caption = hattempt + 1
'Rebound Sequence'

If homeshot < -2 Then
Randomize
hDice4 = (Int(Rnd * 6) + 1)
hAlldice1 = hDice4
Select Case hAlldice1
Case Is = 1
hgamechartresult = 2
Case Is = 2
hgamechartresult = 4
Case Is = 3
hgamechartresult = 6
Case Is = 4
hgamechartresult = 6
Case Is = 5
hgamechartresult = 4
Case Is = 6
hgamechartresult = 2
End Select
hreboundmiss = hgamechartresult + hrebound + (hspeed / 2)
hdie.Caption = hreboundmiss

Randomize
vDice4 = (Int(Rnd * 6) + 1)
vAlldice1 = vDice4
Select Case vAlldice1
Case Is = 1
vgamechartresult = 4
Case Is = 2
vgamechartresult = 6
Case Is = 3
vgamechartresult = 10
Case Is = 4
vgamechartresult = 10
Case Is = 5
vgamechartresult = 6
Case Is = 6
vgamechartresult = 4
End Select
vreboundmiss = vgamechartresult + vrebound + (vspeed / 2)

If vreboundmiss >= hreboundmiss Then Command5.Enabled = True
If vreboundmiss >= hreboundmiss Then Command7.Enabled = False
If vreboundmiss >= hreboundmiss Then Command8.Enabled = False
If vreboundmiss >= hreboundmiss Then Command9.Enabled = False
If vreboundmiss >= hreboundmiss Then Command14.Enabled = False
If vreboundmiss >= hreboundmiss Then Command15.Enabled = False

If vreboundmiss >= hreboundmiss Then Command10.Enabled = False
If vreboundmiss >= hreboundmiss Then Command11.Enabled = False
If vreboundmiss >= hreboundmiss Then Command12.Enabled = False
If vreboundmiss >= hreboundmiss Then Command16.Enabled = False
If vreboundmiss >= hreboundmiss Then Command17.Enabled = False

If vreboundmiss < hreboundmiss Then Command6.Enabled = True
If vreboundmiss < hreboundmiss Then Command10.Enabled = False
If vreboundmiss < hreboundmiss Then Command11.Enabled = False
If vreboundmiss < hreboundmiss Then Command12.Enabled = False
If vreboundmiss < hreboundmiss Then Command16.Enabled = False
If vreboundmiss < hreboundmiss Then Command17.Enabled = False

If vreboundmiss < hreboundmiss Then hrebtot.Caption = hrebtot + 1
If vreboundmiss >= hreboundmiss Then vrebtot.Caption = vrebtot + 1

adie.Caption = vreboundmiss
hdie.Caption = hreboundmiss
End If
'Turnovers'
'Clock'
Randomize
Dicea = (Int(Rnd * 6) + 1)
Diceb = (Int(Rnd * 6) + 1)
tAlldice = Dicea + Diceb
Select Case tAlldice
Case Is = 2
timechartresult = 35
Case Is = 3
timechartresult = 30
Case Is = 4
timechartresult = 25
Case Is = 5
timechartresult = 20
Case Is = 6
timechartresult = 15
Case Is = 7
timechartresult = 10
Case Is = 8
timechartresult = 15
Case Is = 9
timechartresult = 20
Case Is = 10
timechartresult = 25
Case Is = 11
timechartresult = 30
Case Is = 12
timechartresult = 35
End Select
timetotal = timechartresult
time.Caption = time - timetotal

If time.Caption <= 1140 Then minlbl.Caption = "19 minutes"
If time.Caption <= 1080 Then minlbl.Caption = "18 minutes"
If time.Caption <= 1020 Then minlbl.Caption = "17 minutes"
If time.Caption <= 960 Then minlbl.Caption = "16 minutes"
If time.Caption <= 900 Then minlbl.Caption = "15 minutes"
If time.Caption <= 840 Then minlbl.Caption = "14 minutes"
If time.Caption <= 780 Then minlbl.Caption = "13 minutes"
If time.Caption <= 720 Then minlbl.Caption = "12 minutes"
If time.Caption <= 660 Then minlbl.Caption = "11 minutes"
If time.Caption <= 600 Then minlbl.Caption = "10 minutes"
If time.Caption <= 540 Then minlbl.Caption = "9 minutes"
If time.Caption <= 480 Then minlbl.Caption = "8 minutes"
If time.Caption <= 420 Then minlbl.Caption = "7 minutes"
If time.Caption <= 360 Then minlbl.Caption = "6 minutes"
If time.Caption <= 300 Then minlbl.Caption = "5 minutes"
If time.Caption <= 240 Then minlbl.Caption = "4 minutes"
If time.Caption <= 180 Then minlbl.Caption = "3 minutes"
If time.Caption <= 120 Then minlbl.Caption = "2 minutes"
If time.Caption <= 60 Then minlbl.Caption = "1 minute"
If time.Caption <= 50 Then minlbl.Caption = "50 Seconds"
If time.Caption <= 30 Then minlbl.Caption = "30 Seconds"
If time.Caption < 1 Then minlbl.Caption = "20 minutes"
If time.Caption <= 0 Then yourmsg = MsgBox("End of Half", 0, "Game Alert")
If time.Caption <= 0 Then half.Caption = "2nd Half"
If time.Caption <= 0 Then time.Caption = "1200"
If time.Caption <= 0 And half.Caption = "2nd Half" Then yourmsg = MsgBox("End of Regulation", 0, "Game Alert")
If time.Caption <= 0 Then minlbl.Caption = "20 minutes"
End If

If gamechartresult = 3 Then

Randomize
hDice3 = (Int(Rnd * 6) + 1)
hAlldice = hDice3
Select Case hAlldice
Case Is = 1
hgamechartresult = 1
Case Is = 2
hgamechartresult = 2
Case Is = 3
hgamechartresult = 110
Case Is = 4
hgamechartresult = 4
Case Is = 5
hgamechartresult = 5
Case Is = 6
hgamechartresult = 6
End Select
hshot = hgamechartresult + hinside
hdie.Caption = hshot

Randomize
vDice3 = (Int(Rnd * 6) + 1)
vAlldice = vDice3
Select Case vAlldice
Case Is = 1
vgamechartresult = 1
Case Is = 2
vgamechartresult = 2
Case Is = 3
vgamechartresult = 200
Case Is = 4
vgamechartresult = 115
Case Is = 5
vgamechartresult = 5
Case Is = 6
vgamechartresult = 6
End Select
vdefend = vgamechartresult + vdefense

homeshot = hshot - vdefend
hdie.Caption = hshot
adie.Caption = vdefend
'Made Shot'
If homeshot >= 2 Then hTotal.Caption = hTotal + 3
If homeshot >= 2 Then hmade3.Caption = hmade3 + 1
If homeshot >= 2 Then hmade.Caption = hmade + 1
If homeshot >= 2 Then hattempt.Caption = hattempt + 1
If homeshot >= 2 Then hattempted3.Caption = hattempted3 + 1
If homeshot >= 2 Then Command5.Enabled = True
If homeshot >= 2 Then Command6.Enabled = False
If homeshot >= 2 Then Command10.Enabled = False
If homeshot >= 2 Then Command11.Enabled = False
If homeshot >= 2 Then Command12.Enabled = False
If homeshot >= 2 Then Command16.Enabled = False
If homeshot >= 2 Then Command17.Enabled = False
'Miss Shot'
If homeshot < 2 Then hattempted3.Caption = hattempted3 + 1
If homeshot < 2 Then hattempt.Caption = hattempt + 1
'Rebound Sequence'

If homeshot < 2 Then
Randomize
hDice4 = (Int(Rnd * 6) + 1)
hAlldice1 = hDice4
Select Case hAlldice1
Case Is = 1
hgamechartresult = 2
Case Is = 2
hgamechartresult = 4
Case Is = 3
hgamechartresult = 6
Case Is = 4
hgamechartresult = 6
Case Is = 5
hgamechartresult = 4
Case Is = 6
hgamechartresult = 2
End Select
hreboundmiss = hgamechartresult + hrebound + (hspeed / 2)
hdie.Caption = hreboundmiss

Randomize
vDice4 = (Int(Rnd * 6) + 1)
vAlldice1 = vDice4
Select Case vAlldice1
Case Is = 1
vgamechartresult = 4
Case Is = 2
vgamechartresult = 6
Case Is = 3
vgamechartresult = 10
Case Is = 4
vgamechartresult = 10
Case Is = 5
vgamechartresult = 6
Case Is = 6
vgamechartresult = 4
End Select
vreboundmiss = vgamechartresult + vrebound + (vspeed / 2)

If vreboundmiss >= hreboundmiss Then Command5.Enabled = True
If vreboundmiss >= hreboundmiss Then Command7.Enabled = False
If vreboundmiss >= hreboundmiss Then Command8.Enabled = False
If vreboundmiss >= hreboundmiss Then Command9.Enabled = False
If vreboundmiss >= hreboundmiss Then Command14.Enabled = False
If vreboundmiss >= hreboundmiss Then Command15.Enabled = False

If vreboundmiss >= hreboundmiss Then Command10.Enabled = False
If vreboundmiss >= hreboundmiss Then Command11.Enabled = False
If vreboundmiss >= hreboundmiss Then Command12.Enabled = False
If vreboundmiss >= hreboundmiss Then Command16.Enabled = False
If vreboundmiss >= hreboundmiss Then Command17.Enabled = False

If vreboundmiss < hreboundmiss Then Command6.Enabled = True
If vreboundmiss < hreboundmiss Then Command10.Enabled = False
If vreboundmiss < hreboundmiss Then Command11.Enabled = False
If vreboundmiss < hreboundmiss Then Command12.Enabled = False
If vreboundmiss < hreboundmiss Then Command16.Enabled = False
If vreboundmiss < hreboundmiss Then Command17.Enabled = False

If vreboundmiss < hreboundmiss Then hrebtot.Caption = hrebtot + 1
If vreboundmiss >= hreboundmiss Then vrebtot.Caption = vrebtot + 1

adie.Caption = vreboundmiss
hdie.Caption = hreboundmiss
End If
'Turnovers'
'Clock'
Randomize
Dicea = (Int(Rnd * 6) + 1)
Diceb = (Int(Rnd * 6) + 1)
tAlldice = Dicea + Diceb
Select Case tAlldice
Case Is = 2
timechartresult = 35
Case Is = 3
timechartresult = 30
Case Is = 4
timechartresult = 25
Case Is = 5
timechartresult = 20
Case Is = 6
timechartresult = 15
Case Is = 7
timechartresult = 10
Case Is = 8
timechartresult = 15
Case Is = 9
timechartresult = 20
Case Is = 10
timechartresult = 25
Case Is = 11
timechartresult = 30
Case Is = 12
timechartresult = 35
End Select
timetotal = timechartresult
time.Caption = time - timetotal

If time.Caption <= 1140 Then minlbl.Caption = "19 minutes"
If time.Caption <= 1080 Then minlbl.Caption = "18 minutes"
If time.Caption <= 1020 Then minlbl.Caption = "17 minutes"
If time.Caption <= 960 Then minlbl.Caption = "16 minutes"
If time.Caption <= 900 Then minlbl.Caption = "15 minutes"
If time.Caption <= 840 Then minlbl.Caption = "14 minutes"
If time.Caption <= 780 Then minlbl.Caption = "13 minutes"
If time.Caption <= 720 Then minlbl.Caption = "12 minutes"
If time.Caption <= 660 Then minlbl.Caption = "11 minutes"
If time.Caption <= 600 Then minlbl.Caption = "10 minutes"
If time.Caption <= 540 Then minlbl.Caption = "9 minutes"
If time.Caption <= 480 Then minlbl.Caption = "8 minutes"
If time.Caption <= 420 Then minlbl.Caption = "7 minutes"
If time.Caption <= 360 Then minlbl.Caption = "6 minutes"
If time.Caption <= 300 Then minlbl.Caption = "5 minutes"
If time.Caption <= 240 Then minlbl.Caption = "4 minutes"
If time.Caption <= 180 Then minlbl.Caption = "3 minutes"
If time.Caption <= 120 Then minlbl.Caption = "2 minutes"
If time.Caption <= 60 Then minlbl.Caption = "1 minute"
If time.Caption <= 50 Then minlbl.Caption = "50 Seconds"
If time.Caption <= 30 Then minlbl.Caption = "30 Seconds"
If time.Caption < 1 Then minlbl.Caption = "20 minutes"
If time.Caption <= 0 Then yourmsg = MsgBox("End of Half", 0, "Game Alert")
If time.Caption <= 0 Then half.Caption = "2nd Half"
If time.Caption <= 0 Then time.Caption = "1200"
If time.Caption <= 0 And half.Caption = "2nd Half" Then yourmsg = MsgBox("End of Regulation", 0, "Game Alert")
If time.Caption <= 0 Then minlbl.Caption = "20 minutes"
End If
